import os

env = None
# 1.编译器
if os.system("which clang"):
    env = Environment()
else:
    # clang编译器
    env = Environment(tools=["default", "clang"])
    env["CC"] = ["clang"]
    env["CXX"] = ["clang++"]

env["PROGSUFFIX"] = ".out"            # 可执行后缀.out
env["CCFLAGS"] = " -ggdb3 -O0 -Wall"  # gdb 调试开关
env["LIBS"]=["bluetooth"]
src_list = [
    "1_bluetooth蓝牙扫描.c",
    "2_bluetooth_读写实例.c",
    "3_蓝牙bluetooth_rfcomm_server.c","4_蓝牙bluetooth_rccomm_client.c",
    "5_bluetooth_l2cap-server.c","6_bluetooth_l2cap-client.c",
]

for src in src_list:
    env.Program(Split(src))
